<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增战场用户信息管理')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-battle-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">用户名：</label>
                <div class="col-sm-8">
                    <input name="userName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">用户口令：</label>
                <div class="col-sm-8">
                    <input name="userPass" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">用户真实姓名：</label>
                <div class="col-sm-8">
                    <input name="realName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">工作单位：</label>
                <div class="col-sm-8">
                    <input name="workAddress" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">职务：</label>
                <div class="col-sm-8">
                    <input name="duty" class="form-control" type="text">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">选择角色：</label>

                <div class="form-group">
                    <label class="col-sm-3 control-label">选择角色：</label>
                    <select class="col-sm-5"  id="role" name="roleId" >
                        <option th:each="roleList:${roleList}" th:value="${roleList.roleId}" th:text="${roleList.roleName}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "battle/battle"
        $("#form-battle-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-battle-add').serialize());
            }
        }
    </script>
</body>
</html>